/**
  ******************************************************************************
  * @file    xxx.c 
  * @author  SD Electronics xxx
  * @version V1.0
  * @date    xx-xx-xx
  * @brief   xxxxxxxxxxxxxxxxxx.
  ******************************************************************************
  */
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef _SD_DEV_HALL_H
#define _SD_DEV_HALL_H


/* Includes ------------------------------------------------------------------*/



/** 
  * @??  HALL
  */
typedef struct
{
	uint8_t HALL1_Flag;//hall1刷新标志
    uint8_t HALL2_Flag;//hall2刷新标志
    uint8_t HALL3_Flag;//hall3刷新标志
    uint8_t HALL_CalState;//霍尔计数状态
    uint32_t HALL_CIRCLE;//一圈
}ST_HALL_PHY, *PST_HALL_PHY;  

/** 
  * @??  HALL
  */
typedef enum
{
    EN_HALL_1,  //hall1
    EN_HALL_2,  //hall2
    EN_HALL_3,  //hall3
    EN_HALL_MAX,//一圈
}EN_HALL_NUM;  


/*
 * ENUM HALL计数
 */
typedef enum
{
	EN_HALL_WITCH,		//
	EN_HALL_H1_CHECK, 	//
	EN_HALL_H2_CHECK,	//
	EN_HALL_H3_CHECK,	//
	
	EN_HALL_H1CHECK_STEP_SIMP,	//STEP1
	EN_HALL_H1CHECK_STEP_MORE,	//STEP2
	EN_HALL_H1CHECK_MORE_SUM,	//STEP1
    EN_HALL_H1CHECK_SIM_SUM,	//STEP1
	
	EN_HALL_H2CHECK_STEP_SIMP,	//STEP1
	EN_HALL_H2CHECK_STEP_MORE,	//STEP2
	EN_HALL_H2CHECK_MORE_SUM,	//STEP1
    EN_HALL_H2CHECK_SIM_SUM,
	
	EN_HALL_H3CHECK_STEP_SIMP,	//STEP1
	EN_HALL_H3CHECK_STEP_MORE,	//STEP2
	EN_HALL_H3CHECK_MORE_SUM,	//STEP1
    EN_HALL_H3CHECK_SIM_SUM,

    EN_HALL_CHECK1,		//
    EN_HALL_CHECK2,		//
    EN_HALL_CHECK3,		//
    EN_HALL_CHECK4,		//

	EN_HALL_CHECK_SUM,	//STEP2
    EN_HALL_NULL,
}EN_HALL_CHECK;	

/** 
  * @??  HALL
  */
typedef struct
{
	bool	bInitFlag;	        //
	PST_HALL_PHY	pstHALLInfo;
}ST_HALL_CTRL, *PST_HALL_CTRL;  

#endif
/******************* (C) COPYRIGHT 2011 ShenZhenShiding electronics **************************/
